package main

import (
	"flag"
	"jk/jklog"
	"jkconfig"
	"runtime"

	"time"
)

var (
	ownConfigPath = flag.String("jkconfig", "../jkconfig/jkconfig", "own config")
)

func main() {
	runtime.GOMAXPROCS(runtime.NumCPU() - 1)

	flag.Parse()

	// read own config
	jklog.L().Noneln("Read Own Config: " + *ownConfigPath)
	jkconfig.OpenConfig(*ownConfigPath)
	jklog.L().SetLevel(jkconfig.LogLevel())

	jklog.L().Noticeln("jkserver start ...")

	for {
		time.Sleep(50 * time.Millisecond)
	}
}
